<?php
if(!isset($AppUI->id) || ( isset($AppUI->id) && ($AppUI->id <=0 || ($AppUI->id > 0 && $AppUI->type != ROLE_ROOT)))) {
	redirect(HOST_BACKEND);
}
$this->load->model('section_model', 'section');	
$intTotal   = 0;
$intPage    = $this->input->get('page', 1);
$intLimit   = 20;
$intOffset  = ($intPage-1)*$intLimit;
$arrResult	= $this->section->getAll($intOffset, $intLimit, $intTotal);
$this->smarty->assign('arrResult',  $arrResult);
$this->smarty->assign('intTotal',   $intTotal);
$this->smarty->assign('intOffset',  $intOffset);
$this->smarty->assign('intLimit',   $intLimit);
//$this->smarty->assign('arrStatus',  $arrStatus);
$this->smarty->assign('arrType',    $arrType);
$this->smarty->display('section/index.tpl');
